package com.org.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.org.pojo.Admin;
import com.org.pojo.Serve;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * ClassName: AdminMapper
 * Package: com.org.mapper
 * Description:
 *
 * @Author Origin
 * @Create 2024/2/3 19:09
 * @Version 1.0
 */

@Mapper
public interface AdminMapper extends BaseMapper<Admin> {

    @Select("select * from admin where username=#{username}")
    Admin findByUserName(String username);

    @Update("update admin set userPic=#{url} where id=#{id}")
    void updateAvatar(String url, Integer id);
}
